package repository

import "xinyu/model"

type ITestRepo interface {
	SelectByOne() *model.CrmBanner
}

type TestRepo struct {
	DB *model.DataBase
}

func (repo *TestRepo) SelectByOne() *model.CrmBanner {
	var banner model.CrmBanner
	repo.DB.MyDB.Debug().Where("created_at > ?", "2022-01-01 00:00:00").Find(&banner)
	return &banner
}
